import Vue from 'vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import Index from '../components/Index.vue'
import Course from '../components/Course.vue'
import ali from '../components/ali.vue'
import Setting from '../components/Setting.vue'
import Upload from "../components/Upload";
import WxLoginCallback from "../components/WxLoginCallback";

Vue.use(VueRouter)
Vue.use(Vuex)

const videoDetail = () => import('../components/videoDetail.vue');

  const routes = [
    // {
    //   path: '/',
    //   name: 'Upload',
    //   component: Upload,
    //   meta: {
    //     title: '首页'
    //   }
    // },
  {
    path: '/',
    name: 'Index',
    component: Index,
    meta: {
      title: '首页'
    }
  },
  {
    path: '/Course',
    name: 'Course',
    component: Course,
    meta: {
      title: '课程简介页'
    }
  },
  {
    path: '/videoDetail',
    name: 'videoDetail',
    component: videoDetail,
    meta: {
        title: '视频播放页'
    }
  },
  {
    path: '/ali',
    name: 'ali',
    component: ali,
    meta: {
        title: '播放器'
    }
  },
  {
    path: '/Setting',
    name: 'Setting',
    component: Setting,
    meta: {
      title: '个人设置'
    }
  },
  {
    path: '/wx/callback',
    name: 'callback',
    component: WxLoginCallback
  }
]

const router = new VueRouter({
  routes
})

export default router

